package ooday03;

public class Test {
    public static void main(String[] args) {
//        Dog dogg = new Dog();
//        dogg.swim();
        Dog[] dogs = new Dog[3];
        dogs[0]= new Dog("二哈",5,"black");
        dogs[1]= new Dog("金毛",2,"gold");
        dogs[2]= new Dog("田园犬",5,"灰");

        System.out.println(dogs[0].name);

        for(int i= 0;i<dogs.length;i++){
            System.out.println(dogs[i].name);
        }

        Dog dog = new Dog("腊肠",5,"yellow");
        System.out.println(dog.name);
        dog=null;
        System.out.println(dog.name);

        System.out.println("------------------------------");
//        Fish fis = new Fish();
//        fis.swim();

        Fish[] fishes = new Fish[4];
        fishes[0] = new Fish("红鲤鱼",1,"red");
        fishes[1] = new Fish("绿鲤鱼",2,"green");
        fishes[2] = new Fish("白鲤鱼",3,"white");
        fishes[3] = new Fish("金龙鱼",4,"gold");

        for(int i= 0;i<fishes.length;i++){
            System.out.println(fishes[i].color);
        }

        Click[] clicks = new Click[3];
        clicks[0] = new Click("蔡徐坤","灰",20);
        clicks[1] = new Click("蔡徐坤","灰",22);
        clicks[1] = new Click("蔡徐坤","灰",22);

        for(int i= 0;i<clicks.length;i++){
            System.out.println(clicks[i].color);
        }

    }
}
